package com.cabinet.web.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.ConstraintMode;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ForeignKey;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.cabinet.base.entity.IdEntity;


/**
 * 商品出售订单实体
 * @author hqz
 *
 */

@Entity
@Table(name="ict_order")
public class Order extends IdEntity  implements Serializable{
	private static final long serialVersionUID = -6784438547869593457L;
		//订单流水号
	 	private String runNum;
	 	//订单金额
	    private String orderPrice;
	    //交易时间
	    private Date subDate;
	    //是否支付
	    private Integer isPay;
	    //用户是否取件
	    private Integer isPick;
	    //购买用户
	    private Long userId;
	    
	    //订单对应的商品id
	    private Long commoditiesId;
	    //订单对应的智能柜id
	    private String cabId;
	    //订单对应的格子id
	    private Long latticeID;
		public String getRunNum() {
			return runNum;
		}
		public void setRunNum(String runNum) {
			this.runNum = runNum;
		}
		public String getOrderPrice() {
			return orderPrice;
		}
		public void setOrderPrice(String orderPrice) {
			this.orderPrice = orderPrice;
		}
		public Date getSubDate() {
			return subDate;
		}
		public void setSubDate(Date subDate) {
			this.subDate = subDate;
		}
		public Integer getIsPay() {
			return isPay;
		}
		public void setIsPay(Integer isPay) {
			this.isPay = isPay;
		}
		public Integer getIsPick() {
			return isPick;
		}
		public void setIsPick(Integer isPick) {
			this.isPick = isPick;
		}
		public Long getUserId() {
			return userId;
		}
		public void setUserId(Long userId) {
			this.userId = userId;
		}
		public Long getCommoditiesId() {
			return commoditiesId;
		}
		public void setCommoditiesId(Long commoditiesId) {
			this.commoditiesId = commoditiesId;
		}
		public String getCabId() {
			return cabId;
		}
		public void setCabId(String cabId) {
			this.cabId = cabId;
		}
		public Long getLatticeID() {
			return latticeID;
		}
		public void setLatticeID(Long latticeID) {
			this.latticeID = latticeID;
		}
	    
	   /* @ManyToOne(fetch = FetchType.LAZY)
	    @JoinColumn(name="user_account", foreignKey=@ForeignKey(value = ConstraintMode.NO_CONSTRAINT))
	    private User user;
	    
	    @OneToOne(fetch = FetchType.LAZY)
	    @JoinColumn(name="commodities_id", foreignKey = @ForeignKey(value=ConstraintMode.NO_CONSTRAINT))
	    private Commodities commodities;
	    
	    @OneToOne(fetch = FetchType.LAZY)
	    @JoinColumn(name="lattice_id", foreignKey = @ForeignKey(value=ConstraintMode.NO_CONSTRAINT))
	    private Lattice lattice;*/
}
